﻿@using Akso.Entities
@using Akso.Web.Areas.Mpa.Models.Common.Modals
@model Akso.Web.Areas.Inventory.Models.Inbounds.CreateOrEditInboundModalViewModel
@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(Model.IsEditMode ? (L("Page_Inventory.Inbounds_Button_EditInbound") + ": " + Model.Inbound.Vendor) : L("Page_Inventory.Inbounds_Button_CreateNewInbound")))
<div class="modal-body">
    <form name="ObjectForm" role="form" novalidate class="form-validation">
        @if(Model.IsEditMode)
        {
            <input type="hidden" name="Id" value="@Model.Inbound.Id" />
        }

        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="Vendor" value="@Model.Inbound.Vendor" class="form-control edited" required maxlength="@Inbound.MaxVendorLength" />
            <label>@L("Page_Inventory.Inbounds_Column_Vendor")</label>
        </div>
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="InvoiceNumber" value="@Model.Inbound.InvoiceNumber" class="form-control edited" required maxlength="@Inbound.MaxInvoiceNumLength" />
            <label>@L("Page_Inventory.Inbounds_Column_InvoiceNumber")</label>
        </div>
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="MaterialNo" value="@Model.Inbound.MaterialNo" class="form-control edited" required maxlength="@Inbound.MaxMaterialNoLength" />
            <label>@L("Page_Inventory.Inbounds_Column_MaterialNo")</label>
        </div>
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="MaterialNameCn" value="@Model.Inbound.MaterialNameCn" class="form-control edited" required maxlength="@Inbound.MaxMaterialNameCnLength" />
            <label>@L("Page_Inventory.Inbounds_Column_MaterialNameCn")</label>
        </div>
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="MaterialNameEn" value="@Model.Inbound.MaterialNameEn" class="form-control edited" required maxlength="@Inbound.MaxMaterialNameEnLength" />
            <label>@L("Page_Inventory.Inbounds_Column_MaterialNameEn")</label>
        </div>
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            
            <select ng-model="Vendor" class="form-control"
                    ng-options="act.Vendor for act in Inbounds">
                <option value="@Model.Inbound.Vendor">@Model.Inbound.Vendor</option>
            </select>
            <label>@L("Page_Inventory.Inbounds_Column_Delivery")</label>
        </div>
</form>
</div>

@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")